New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

anchor-js

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anchor-js

A JavaScript utility for adding deep anchor links to online docs.

  • 4.3.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.6K
decreased by-29.28%
Maintainers
1
Weekly downloads
 
Created
Source

AnchorJS Build Status

A JavaScript utility for adding deep anchor links (like these) to existing page content. AnchorJS is lightweight, accessible, and has no dependencies.

See Live Examples in the Documentation.

Anchoring links

Installation

Download AnchorJS using npm,

npm install anchor-js

...and then include it into your project:

import AnchorJS from 'anchor-js';

const anchors = new AnchorJS();
anchors.add();

You could also include it in your webpage via a CDN like CDNJS or jsDelivr.

<script src="https://cdn.jsdelivr.net/npm/anchor-js/anchor.min.js"></script>
<script>
   anchors.add();
</script>

Usage

See the Documentation for detailed instructions.

Compatibility

Currently Supports: IE9+ and modern browsers

Contributing devDependency Status

To contribute:

  1. Fork/Clone the repo.
  2. Make your changes.
  3. Write tests as needed.
  4. Run tests locally to confirm everything is working:
    • Install test modules: Run npm ci
    • Run all tests: npm test
  5. Minify and prepare the code: npm run build
  6. Submit a Pull Request.

License

Licensed with the MIT License.

Keywords

FAQs

Package last updated on 17 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc